package com.addedstuff;

import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;

public class wandoft extends Item {

	
	//this teleports the user to the cursor

	public wandoft(int par1) {
		super(par1);
		this.setCreativeTab(CreativeTabs.tabCombat);
	}
	public void registerIcons(IconRegister iconReg)
    {
        itemIcon = iconReg.registerIcon("Brianmodbase:Wand");
    }
	
	public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
	{
		MovingObjectPosition corrdinate=par3EntityPlayer.rayTrace(500, 1);
		if(corrdinate!= null) {
			par3EntityPlayer.setPosition(corrdinate.blockX, corrdinate.blockY + 1, corrdinate.blockZ);
		}
		return par1ItemStack;
	}

}
